# pylint: disable-msg=E1101
"""
@author: Sergiy Tsymbalyuk
"""

import logging

from pylons.i18n import lazy_ugettext as _

from repoze.what.plugins.pylonshq import ControllerProtector
from repoze.what.predicates import has_permission

from chowa.lib.site.crud import ViewEditController
from hrms.model.organization import Order

from hrms.lib.base import BaseController, render, Session

log = logging.getLogger(__name__)

@ControllerProtector(has_permission('hrms.administer.orders'))
class OrderController(ViewEditController):
    __model__ = Order
    __view_template__ = '/hrms/orders/order.html'
    __edit_columns__ = ['type', 'number', 'approved']
